#pragma once
#include "Header.h"
#include "nlohmann/json.hpp"
#include "mysql.h"
class DBStmt final
{
public:
	DBStmt();
	~DBStmt();

	bool ConnectMySql(MYSQL* mysql,const std::string& _ip, int _port,
		const std::string& _user, const std::string& _pwd,const std::string& _dbName
	);
	void CloseConnect(MYSQL* mysql);

public:
	bool DoSql();
	void QueryResult();


private:
	void prepare_statement(const std::string& query);
	void bind_parameters();
	bool execute_statement();
public:
	MYSQL* _mysql;
private:
	MYSQL_STMT* _stmt;
};
